<template>
<div class="CentreNeiong">
  <div class="headNews">
    <div  class="leftNews" v-for="(i,index) in getCarousel" :key="index"  >{{i.articleSource }}
      <div class="midNeiong">
        <p class="myp" v-for="(i,index) in getCentreNeiong" :key="index"  >
<!--          <span>{{i.content}}</span>-->
        <img  :src="i.coverImgUrl">
        </p>
      </div>
  </div>
</div>
</div>
</template>

<script>
import {getCarousel} from "@/api/api-index";
import {getCentreNeiong} from "@/api/api-index"
export default {
  name: "CentreNeiong",
  data(){
    return {
      getCarousel:[],
      getCentreNeiong:[]
    }
  },
  created: function () {
    getCarousel().then(res => {
      if (res.code === 0) {
        this.getCarousel = res.rows
      }
    })
        getCentreNeiong().then(res => {
          console.log(res)
          if (res.code===0){
            this.getCentreNeiong=res.rows

          }
        })
  }
}
</script>

<style scoped lang="less">
.CentreNeiong{
  margin-top: 10px;
  .headNews{
    margin-top: 25px;
    .leftNews{
      //margin-left: 10px;
      font-size: 18px;
      margin-left: 9px;
  }


    .rightNeiong{
      margin-top: 5px;
      display: flex;
      width: 40%;
      justify-content: space-between;
      margin-right: 22px;
    }

  }
 .midNeiong  p img{
   width: 40%;

  }



}

</style>